Repository navigation
Remove the package services primitive - #1552
Conversation
Durable Object outbound sockets are not a process supervisor. Fleet usage showed no running services. Keep only ADR 0024 and the D1/UserMeter/DO migrations. Co-authored-by: me <me@kentcdodds.com>
|
Important Review skippedToo many files! This PR contains 149 files, which is 49 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (149)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-1552.kody-a99.workers.dev Worker: Mocks:
|
The first deletion pass left present-tense UI, docs, and MCP text that still described package services, and silently stripped kody.services instead of rejecting it. Co-authored-by: me <me@kentcdodds.com>
Keep the deleted package-service tests; main only changed an oxlint import there. Co-authored-by: me <me@kentcdodds.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 629fd48. Configure here.
D1 cannot delete Durable Objects, so migration 0016 now keeps kind=service user_storage_buckets rows until the estimate-backfill lane clears those StorageRunner objects and then deletes the inventory. Export, deletion, and DR keep discovering leftover service storage ids until that purge succeeds. Co-authored-by: me <me@kentcdodds.com>
0016 is new on this branch, so the ledger hash must match the revised SQL that leaves leftover service storage rows for the StorageRunner purge. Co-authored-by: me <me@kentcdodds.com>
Co-authored-by: me <me@kentcdodds.com>
Co-authored-by: me <me@kentcdodds.com>
Renumber the no-package-services ADR to 0025 after main claimed 0024 for packages-outrank-synthesized-providers. Co-authored-by: me <me@kentcdodds.com>

Intent
Delete package services as a Kody primitive. Durable Object outbound sockets are not a process supervisor, and a fleet check found no one running services.
Summary
kody.services, the MCPservicesdomain,PackageServiceInstance, plan entitlements, andservice/serviceContextruntime helpers.kody.servicesinstead of stripping the field.0016-drop-package-service-states.sqldrops the enumeration table. Leftoverkind=serviceuser_storage_bucketsrows stay until thestorage_bucket_estimate_backfilllane clears those StorageRunner Durable Objects and then deletes the inventory, so account export, deletion, and DR keep a user→storage_id map.package_service_states.v26(main worker) andv2(runtime worker)deleted_classesforPackageServiceInstance, plus the DO deletion allowlist / baseline updates.Kent's
@kentcdodds/discordgateway service is removed in the package repo separately; Flykody-discord-gateway-proxyis the live Gateway. The hiddendiscord-gateway-cf-experimentpackage no longer declareskody.services.Testing
package_services/persistent_package_services. Only Kent had historicalservice_runtimefrom the gateway experiment.kody.servicesand rewrote remaining present-tense UI/docs/MCP copy.check-migrations(15/15). Fullnpm run test:node: 1847/1847.me@kentcdodds.com/user-meon merge commit ofe07a0e6b(will re-run after this HEAD's preview deploys):services-removed-audit.GET /guides/package-service-pattern.jsonis 404.service.System changes
System recap — removes a primitive (high risk)
Mode: recap · Base:
main· Head:cursor/remove-package-services-8713Classification: removes
package-services— Durable Object supervisor, MCP domain, entitlements, and runtime helpers are gone. Remaining work uses jobs, workflows, and external processes.Primitives touched
package-servicesprimitives.yamlcapability-registryservicesdomain deleteduser-meterpackage_service_statesd1-app-dbpackage_service_states; keep leftoverkind=serviceinventorydurable-storageentitlementspackage_services/persistent_package_servicesremovedpackage-runtimeservicehelpersaved-packageskody.servicesrejected as unsupportedrun-recordsservicesurfaceusage-meteringservice_runtimewritesapp-uimcp-serverChange flow
A package publish or
service_startpath no longer exists. Leftoverkody.servicesfails publish instead of being stripped. Leftover service StorageRunner objects stay inventoried until the estimate-backfill lane clears them.Before / after
Before:
package.json#kody.services→PackageServiceInstanceDO → Worker Loader isolate →service_start/service_stop.After: no service declaration, no service MCP tools, no service DO. Daemons run outside Kody. Leftover
service:StorageRunner objects stay exportable and deletable until the backfill purge clears them.Invariants
Per-user isolation is unchanged. This change only removes a compute surface; it does not share state across users. Account export and deletion keep discovering leftover service storage ids until those Durable Objects are cleared.